﻿using AngleExpress.viewmodel;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Data;

namespace AngleExpress.converter
{
    [System.Windows.Data.ValueConversion(typeof(ShowWhat), typeof(Visibility))]
    class NotifyTableVisibleConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            ShowWhat show = (ShowWhat)value;
            if (show == ShowWhat.Table)
                return Visibility.Visible;
            else
                return Visibility.Hidden;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }


    [System.Windows.Data.ValueConversion(typeof(ShowWhat), typeof(Visibility))]
    class NotifyDetailVisibleConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            ShowWhat show = (ShowWhat)value;
            if (show == ShowWhat.Detail)
                return Visibility.Visible;
            else
                return Visibility.Hidden;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
